package com.wxsong.authplatform.authweb.model.users;



import com.wxsong.authplatform.authweb.util.PasswordUtil;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

public class Users implements Serializable {

    private long id;
    private String name;
    private int age;
    private Date birth;
    private Date createTime;
    private String password;

    public Users(long id, String name, int age, Timestamp birth, Timestamp createTime, String password) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.birth = birth;
        this.createTime = createTime;
        this.password = password;
    }

    public Users(String name, int age, Timestamp birth, String password) {
        this.name = name;
        this.age = age;
        this.birth = birth;
        this.password = password;
    }

    public void encryPassword(){
        this.password = PasswordUtil.encry(this.password);
    }

    public long getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public Date getBirth() {
        return birth;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public String getPassword() {
        return password;
    }

}
